package org.biojava.services.das.servlets;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.biojava.services.das.dao.DasServer;
import org.biojava.services.das.dao.ServerManager;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

public class DasServerController extends AbstractController{
	private ServerManager serverManager;


	public ServerManager getServerManager() {
		return serverManager;
	}

	public void setServerManager(ServerManager serverManager) {
		this.serverManager = serverManager;
	}

	
	public DasServerController(){
		
	}

	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {
		List<DasServer> servers=serverManager.getDasServers();
		return new ModelAndView("listServers","servers", servers );

	}

}
